<template>
  <a-card class="content" :bordered="false">
    <div class="table_caozuo">
      <template v-for="(item,index) in btn">
        <a-button
          :key="index"
          @click="handler(index)"
          type="primary"
          icon="plus"
          v-if="item.isShow"
        >{{item.title}}</a-button>
      </template>
      <!-- <span>{{ '已选择 '+number+' 项' }}</span>
      <a-button type="link" @click="clearSelection">清空</a-button>-->
    </div>
    <a-table
      rowKey="id"
      :columns="platformOrderListColumns"
      :dataSource="loadData"
      :pagination="false"
      :loading="loading"
      :scroll="{ x:1720}"
    >
    <template slot-scope="text,record,index" slot="indexLabel">
        <span>{{index+(page.current - 1) * page.size + 1}}</span>
      </template>
      <span slot="span" slot-scope="status,record">
        <span>{{record.status | status}}</span>
      </span>
      <span slot="action" slot-scope="text,record">
        <template>
          <a-button
            type="link"
            @click="chuKuClick(record)"
            v-if="record.status == '00' || record.status == '01'"
          >出库</a-button>
          <a-button
            type="link"
            @click="zuoFei(record)"
            v-if="record.status == '00' || record.status == '01'"
          >作废</a-button>
          <a-button type="link" @click="details(record)">详情</a-button>
        </template>
      </span>
    </a-table>
    <template>
      <div style="width:100%;position:relative;height:100px">
        <a-pagination
          show-quick-jumper
          show-size-changer
          v-model="page.current"
          :page-size-options="['10', '20', '30', '40', '50']"
          :total="page.total"
          :page-size.sync="page.size"
          @showSizeChange="onShowSizeChange"
          @change="onShowSizeChange"
          :show-total="total => `共 ${total} 条`"
          style="margin:2% 0;position:absolute;right:1%"
        />
      </div>
    </template>
  </a-card>
</template>

<script src='./platformOrderList.js'></script>

<style lang="less">
.content {
  & > .ant-card-body {
    padding: 0;
    padding-top: 8px;
  }
}
</style>